package com.zxt.dental_sys.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName reservation_info
 */
@TableName(value ="reservation_info")
@Data
public class ReservationInfo implements Serializable {
    /**
     * 预约id
     */
    @TableId
    private String reservationId;

    /**
     * 患者id
     */
    private String patientUserId;

    /**
     * 预约时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date reservationTime;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 麻醉方式
局部麻醉
镇静麻醉
静脉镇静
全身麻醉
     */
    private String aneshesiaType;

    /**
     * 插入时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date inputTime;

    /**
     * 是否删除
     */
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ReservationInfo other = (ReservationInfo) that;
        return (this.getReservationId() == null ? other.getReservationId() == null : this.getReservationId().equals(other.getReservationId()))
            && (this.getPatientUserId() == null ? other.getPatientUserId() == null : this.getPatientUserId().equals(other.getPatientUserId()))
            && (this.getReservationTime() == null ? other.getReservationTime() == null : this.getReservationTime().equals(other.getReservationTime()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getAneshesiaType() == null ? other.getAneshesiaType() == null : this.getAneshesiaType().equals(other.getAneshesiaType()))
            && (this.getInputTime() == null ? other.getInputTime() == null : this.getInputTime().equals(other.getInputTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getReservationId() == null) ? 0 : getReservationId().hashCode());
        result = prime * result + ((getPatientUserId() == null) ? 0 : getPatientUserId().hashCode());
        result = prime * result + ((getReservationTime() == null) ? 0 : getReservationTime().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getAneshesiaType() == null) ? 0 : getAneshesiaType().hashCode());
        result = prime * result + ((getInputTime() == null) ? 0 : getInputTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", reservationId=").append(reservationId);
        sb.append(", patientUserId=").append(patientUserId);
        sb.append(", reservationTime=").append(reservationTime);
        sb.append(", status=").append(status);
        sb.append(", aneshesiaType=").append(aneshesiaType);
        sb.append(", inputTime=").append(inputTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}